package com.xbongbong.pro.domain.entity;

import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/***
 * 精线索用量实体
 *
 * @author hongxiao
 * @date 2021-12-29 23:24
 */
@Getter
@Setter
@ToString
public class FineClueConsumptionEntity implements Serializable {
    /**
     * id
     */
    private Long id;

    /**
     * 公司id
     */
    private String corpid;

    /**
     * 开通用户id
     */
    private String userId;

    /**
     * saas业务类型
     */
    private Integer businessType;

    /**
     * 表单id
     */
    private Long formId;

    /**
     * 开通用户id
     */
    private Long dataId;

    /**
     * 精线索数据id
     */
    private String pid;
    /**
     * 三方数据来源：1：精线索
     * @see com.xbongbong.saas.enums.business.ExternalDataSourceEnum
     */
    private Integer source;

    /**
     * 使用时间
     */
    private Long useTime;
    /**
     * 状态：0解锁失败，1已解锁，2已释放
     * @see com.xbongbong.pro.enums.menu.enums.FineClueStatusEnum
     */
    private Integer status;
    /**
     * 
     */
    private Long addTime;

    /**
     * 
     */
    private Long updateTime;

    /**
     * 
     */
    private Integer del;

    private static final long serialVersionUID = 1L;

    public FineClueConsumptionEntity () {
        this.del = 0;
        this.status = 0;
        this.addTime = DateTimeUtil.getInt();
        this.updateTime = DateTimeUtil.getInt();
    }

    public FineClueConsumptionEntity(String corpid, String userId, Integer businessType, Long formId, Long dataId, String pid, Long useTime) {
        this();
        this.corpid = corpid;
        this.userId = userId;
        this.businessType = businessType;
        this.formId = formId;
        this.dataId = dataId;
        this.pid = pid;
        this.useTime = useTime;
    }
}